Method and Apparatus for Scheduling Data Backups

ABSTRACT

An apparatus and computer-executed method for scheduling data backups may include accessing a specification for a backup job. The specification may include an identification of a data source, a start time and a target storage device to which backup data should be written. A first history of past backup jobs that specify the data source, and a second history of past backup jobs that specify the target storage device, may be identified. Using the first history, an expected size of the backup data may be computed. Using the second history, an expected rate at which the backup data may be written to the target storage device may be computed. Using the expected size, the expected rate and the start time, an expected completion time for the backup job may be computed.

RELATED APPLICATIONS

Benefit is claimed under 35 U.S.C. 119(a)-(d) to Foreign application Serial No. 232/CHE/2010 entitled “METHOD AND APPARATUS FOR SCHEDULING DATA BACKUPS” by Hewlett-Packard Development Company, L.P., filed on Jan. 29, 2010, which is herein incorporated in its entirety by reference for all purposes.

BACKGROUND

It is standard practice in enterprise information technology (“IT”) environments to backup regularly all of the data that is important for supporting business operations. For example, databases must be backed up regularly because their contents change on a daily basis, as do the contents of email servers and the like. The purpose of making backups of such storage repositories is to provide a fall-back copy of critical data in the event data is lost in the production environment.

One of the problems that present themselves in the context of making data backups is ensuring the availability of appropriate target storage devices for receiving the data generated when a backup job runs. A human administrator typically schedules each backup job by specifying the source data to be backed up, a start time when the backup should be taken and a target device to which the backup data should be written. But the duration of backup jobs can vary quite dynamically in practice. The size of a backup, even for the same data source, can change over time because the data in the source repository can grow or shrink as, for example, the tables in a database are populated and purged. And the rate of progress for a backup job can vary over time as, for example, bandwidth demands over the relevant network increase or decrease.

Consequently, it has become quite difficult for human administrators to predict when a given target storage device will be free, in large part because it has become difficult to know when a backup job utilizing a given target device will be completed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an example system suitable for scheduling and executing data backups in accordance with embodiments of the invention.

FIG. 2 is a block diagram illustrating components contained in and implemented by the server of FIG. 1.

FIG. 3 is a block diagram illustrating specifications for currently-scheduled backup jobs according to FIG. 2.

FIG. 4 is a block diagram illustrating histories of completed backup jobs according to FIG. 2.

FIG. 5 is a block diagram illustrating a specification for a to-be-scheduled backup job according to FIG. 2.

FIG. 6. is a flow diagram illustrating example behavior of the components of the server of FIG. 2 when scheduling data backups according to embodiments of the invention.

FIG. 7 is a flow diagram illustrating further example behavior of the components of the server of FIG. 2 when scheduling data backups according to embodiments of the invention.

FIG. 8 is a flow diagram illustrating example behavior of the components of the server of FIG. 2 when determining an expected size of a data backup job according to embodiments of the invention.

FIG. 9 is a flow diagram illustrating example behavior of the components of the server of FIG. 2 when determining an expected completion rate of a data backup job according to embodiments of the invention.

FIG. 10 is a flow diagram illustrating example behavior of the components of the server of FIG. 2 when computing a measure of the degree to which samples in a set of completed backup job histories differ from one another, according to embodiments of the invention.

FIG. 11 is a block diagram illustrating an example weighting vector that may be used in embodiments of the invention.

DETAILED DESCRIPTION

FIG. 1 illustrates an example system 100 suitable for scheduling and executing data backups in accordance with embodiments of the invention. System 100 may include multiple data sources 102 and multiple target data storage devices 104, each of which may be interconnected by means of one or more networks or other switching fabrics 106. Also connected to networks 106 is one or more server computer systems 108. Server computer systems 108 may also contain or have access to one or more tangible computer-readable storage mediums such as disk device 110.

Data sources 102 need not all be of the same type. Indeed, in practice, data sources 102 will typically vary in type. For example, in an enterprise IT environment, data sources 102 might take the form of database server clusters, email servers, desktop computers and the like. Similarly, target storage devices 104 may vary in type. One might be a magnetic disk drive or a set of magnetic disk drives managed by a host to present disk blocks or entire file systems to clients. Others might be tape drives, while still others might be optical disk drive devices. Other types of storage devices may also be used. Networks 106 may take any conventional form, including without limitation the Internet, an intranet, a local area network, a backplane or switching fabric internal to a host computer, a fibre channel network or any combination of the foregoing. The host computing devices supporting servers 108 may also take any conventional forms. And storage mediums 110 may take any conventional form such as magnetic disks, optical disks, flash memory, system memory or the like.

FIG. 2 illustrates example components that may be contained in and/or implemented by servers 108. It is also possible for one or more of the components of FIG. 2 to be contained in and/or implemented by any of the other components of FIG. 1, including for example data sources 102 or target storage devices 104. And the components illustrated in FIG. 2 need not be implemented discretely as shown; rather, one or more of them may be integrated together into unified modules if desired. They need not all reside on the same host.

Backup server 112 may include at least an estimator component 114 and a scheduler component 116. Backup server 112 may have access to a specification 118 for a to-be-scheduled backup job, a repository 120 of histories of completed backup jobs, and a repository 122 of specifications for currently-scheduled backup jobs.

FIG. 3 illustrates example contents of repository 122. Each specification 124 for a currently-scheduled backup job corresponds to a job that either has not yet started or that has not yet been completed. Typically, each specification 124 would include an identifier 126 of a data source, an identifier 128 of a start time for the backup job, and an identifier 130 of a target storage device to which backup data for the backup job should be written. Other kinds of information may also be included in each specification.

FIG. 4 illustrates example contents of repository 120. Each history 132 in repository 120 may correspond to a past backup job that has already been completed. Because each of the jobs in repository 120 has been completed, additional information will be available for each. For example, like repository 122, each history 132 may include indicators 134, 136 and 138 or a data source, a start time and a target device. But each history 132 may also include information such as the size 140 of the data that was backed up when the job was run (e.g. a number of megabytes or gigabytes), and the duration 142 of the backup operation. Instead of a duration, equivalently a stop time for the backup operation might be included so that the duration job may be inferred from the start and stop times. A completion rate for the backup job may be explicitly recorded in each history 132, or the completion rate may be inferred from size and duration information.

FIG. 5 illustrates example contents of a specification 118 for a to-be-scheduled backup job. Typically such a specification will include at least an identifier 144 of a data source and an identifier 146 of a start time (e.g. a date and a time) for the backup job. A specification 118 might also include other information such as a desired target storage device.

FIG. 6. illustrates example behavior of backup server 112 when scheduling data backups according to embodiments of the invention. In general, the steps shown in FIG. 6 may typically take place in the context of scheduling a new backup job. For example, a new backup job may already have a data source and a start time specified, and server 112 may select an appropriate target device for the new backup job. Or the new backup job may already specify a target device, and server 112 may select an appropriate start time given the constraints of the specified data source and target device. The steps of FIG. 6 may take place in other contexts as well.

Given a to-be-scheduled backup job 118, the task is either to select a target device or a start time for the new job. To do so, server 112 may estimate when some target device will be free to receive data from the new job. Thus, FIG. 6 describes a method for determining when a particular target storage device will be free. In step 148, server 112 accesses a specification 124 for a currently-scheduled backup job. It then computes an expected completion time for the currently-scheduled backup job. It may do so by computing both an expected size for the currently-scheduled backup job and an expected completion rate for the currently-scheduled backup job. It may compute the size and the rate serially or in parallel. To compute the size, server 112 may identify, in step 150, a set of relevant histories from repository 120 that have specified the same data source as does the currently-scheduled backup job. To make the set even more relevant, it may further reduce the set to include only histories that share other attributes with the currently-scheduled backup job. For example, if the job to be estimated is a full backup, then histories may be chosen for full backups. But if the job to be estimated is a partial backup, then histories for partial backups may be chosen. Other attributes may also be used. In step 152, it uses this set of histories to compute the expected size of the currently-scheduled backup job. Similarly, to compute rate, server 112 identifies in step 154 a set of relevant histories from repository 120 that have specified the same target storage device as does the currently-scheduled backup job. This set may also be further refined to include only histories that share other attributes with the job to be estimated, as was just described. The latter set of histories may be unrelated to the former set, but may also include some of the same histories as does the former set. In step 156, server 112 uses the selected histories to compute the expected completion rate of the currently-scheduled backup job. Note that the same techniques may be used to estimate the size and completion rate of any job, whether or not the job is actually a currently-scheduled job.

The inventors hereof have discovered that computing size and rate independently and in this fashion achieves superior accuracy to merely attempting to compute expected completion time directly using a single set of histories. Improved results may also be achieved by using histories in each of the two sets whose start times are the same as or similar to the start time specified by the currently-scheduled backup job. Other attributes of the job to be estimated may also be used to select more relevant histories, as was described above.

In step 158, server 112 is now in a position to compute the expected completion time for the currently-scheduled backup job. It may do so, for example, by dividing the expected size (e.g. in gigabytes) by the expected completion rate (e.g. in gigabytes per unit time) and then adding the result to the start time of the currently-scheduled backup job. In step 158, estimator component 114 may make the computed expected completion time value available to scheduler component 112 for further use such as the uses described in FIG. 7.

Referring now to FIG. 7, scheduler 112 may determine in step 162 whether a start time specified by to-be-scheduled backup job 118 is greater than or equal to the computed expected completion time. If not, then it would be inappropriate to schedule job 118 on the same target device as is being used by the currently-scheduled backup job. In that instance, control may return to step 148 and another currently-scheduled backup job may be selected for investigation. But if the start time for the to-be-scheduled job is later than the just-computed expected completion time, then control may continue with step 164. In step 164, scheduler 112 determines whether the other characteristics of the target device are also appropriate for the to-be-scheduled backup job. For example, it may determine whether the target device is of the appropriate type, has the appropriate expected speed and has adequate capacity to receive data from the new job. (For efficiency, the considerations in step 164 may also be employed in selecting among the currently-scheduled backup jobs to be investigated.) If the target device is not appropriate, then control may resume at step 148 with another currently-scheduled backup job. But if it is, then scheduler 112 in step 166 may select the target device of the currently-scheduled backup job for the new backup job. In step 168, it may then schedule the new job accordingly. In step 170, it may execute the job by conventional means, writing some or all of the source data to the target device as needed.

Either or both of the expected size and the expected completion rate computations described above may be performed using one of two different methods. The same method need not be used for both the size and the rate when computing the expected completion time for a given target device. Rather, one method may be used for computing the expected size and the other method may be used for computing the expected completion rate as appropriate. To determine which method to use in a given instance it is useful to compute, for a given selected set of histories 132 and for a given size or rate, some measure of the degree to which that parameter differs among the various samples in the relevant set of histories. FIG. 8 makes this more clear for the case of computing the expected size. FIG. 9 makes this more clear for the case of computing the expected completion rate.

Referring now to FIG. 8, in step 172 server 112 may compute a measure of the degree to which backup sizes vary among the histories in the set that was selected in step 150.

One way of computing this measure is illustrated in more detail in FIG. 10. Referring briefly now to FIG. 10, in step 186 three consecutive samples or histories may be chosen from the set. In step 188, the measure may be computed as the absolute value of [twice one of the samples minus the sum of the other two samples]. For example, assume we have chosen three consecutive histories i−1, i, i+1. Let the backup sizes corresponding to those histories be S_(i−1), S_(i) and S_(i+1) respectively. The measure may be computed then as ABS[2S_(i)−S_(i−1)−S_(i+1)]. In other embodiments, the measure may be computed as ABS[2S_(i+1)−S_(i)−S_(i−1)]. Still other variants may be employed. In some embodiments, the most recent three samples may be chosen for analysis. In other embodiments the measure may be computed for each sample in the set for which adequate data is available. In the latter embodiments, an aggregate of the computed measures may be employed in step 174 in lieu of a measure that corresponds to only a single point in time.

Referring again to FIG. 8, the computed measure may be compared in step 174 to a threshold value. If the computed measure exceeds the threshold, this may be taken to indicate that the backup sizes change abruptly from one sample to the next in the relevant set of histories. In this instance, the method of steps 176-178 may be employed to compute expected size. In the method of steps 176-178, the value computed for expected size can vary abruptly from the sizes of the most recent samples in the set of histories. In the method of steps 180-182, on the other hand, the value computed for expected size normally would not vary quite so abruptly from previous sizes. Thus the method of steps 176-178 may be referred to as the “swift” approach, while the method of steps 180-182 may be referred to as the “gradual” approach. The latter approach may be employed when the computed measure is not above the threshold. Moreover, in step 174, the choice as to which method to employ may be based on whether the measure has exceeded the threshold over a period of time (for numerous recent samples in the set of histories) rather than just for the most recent samples.

In step 176, a base size may be set equal to the backup size from the most recent history in the set. In step 178, a size delta may be computed as a weighted mean of the differences between the backup sizes of consecutive samples in the set. The nature of the weighting vectors that may be used to compute this weighted mean will be discussed in more detail below with reference to FIG. 11.

In step 180, the base size may be set equal to the mean of the backup sizes of the samples in the set. In step 182, the size delta is computed as the standard deviation of the backup sizes of the samples in the set.

In step 184, regardless of whether the swift or the gradual method was used to compute the base size and the size delta, the expected size is computed by summing the base size and the size delta.

Steps 190-202 of FIG. 9 are analogous to steps 172-184 of FIG. 8. In step 190, a measure may be computed to indicate the degree to which completion rate varies among the samples in the set that was identified in step 154. The techniques for doing so may be the same as those described above with reference to FIG. 10. In step 192, the measure may be compared with a threshold, either over a period of time as described above or for the most recent samples in the set. The threshold used in step 192 may differ from the one used in step 174. Depending on the outcome of the comparison, the swift method of steps 194-196 may be used to compute the expected completion rate, or the gradual method of steps 198-200 may be used to do so.

According to the swift method of steps 194-196, a base rate is set equal to the completion rate of the most recent sample in the relevant set of histories, and a rate delta is computed as a weighted mean of the differences between completion rates of consecutive samples in the set of histories. Again, weighting vectors appropriate for this operation will be discussed in more detail below.

According to the gradual method of steps 190-200, the base rate is set equal to the mean of the completion rates of the samples in the relevant set of histories. And the rate delta is computed as the standard deviation of the completion rates of the samples in the set of histories.

Regardless of which method was used to compute the base rate and the rate delta, the expected rate is computed in step 202 as the sum of the base rate and the rate delta.

Various weighting vectors may be used in the context of computing any of the weighted means described above. FIG. 11 illustrates one such vector 204 of weights 206. Each weight 206 is associated with one sample 210 from a set 208 of histories. In the illustration, weights 206 sum to 1. The smallest weight value W₀ is associated with the oldest sample S₀ in the set, and the largest weight value W_(n) is associated with the most recent sample S_(n) in the set. Each individual weight may be computed as shown in the cells of the drawing, where x is computed as the value of the arithmetic series from 1 to n, as shown. In this way, the weights vary linearly and emphasize the more recent samples over the older ones.

In other embodiments, the weighting vector may be constructed differently. For example, a weighting vector may be constructed either automatically or manually to give samples greater weight if their values are closer to the mean of the samples in the set, and to de-emphasize outlying samples whose values vary to a greater degree from the mean. Other weighting schemes may be employed as appropriate.

While the invention has been described in detail with reference to preferred embodiments thereof, the described embodiments have been presented by way of example and not by way of limitation. It will be understood by those skilled in the art and having reference to this specification that various changes may be made in the form and details of the described embodiments without deviating from the spirit and scope of the invention as defined by the appended claims. 

1. A computer-executed method for scheduling data backups, comprising: accessing a specification for a first backup job including an identification of a data source, a start time and a target storage device to which backup data should be written; accessing a first history of past backup jobs that specify the data source, and a second history of past backup jobs that specify the target storage device; using the first history, computing an expected size of the backup data; using the second history, computing an expected rate at which the backup data may be written to the target storage device; using the expected size, the expected rate and the start time, computing an expected completion time for the first backup job; and making the expected completion time for the first backup job available to a scheduler.
 2. The computer-executed method of claim 1 wherein the scheduler is also computer-executed and is configured: to determine that a specified start time for a second backup job occurs at or after the expected completion time of the first backup job; and to select the target storage device for the second backup job.
 3. The computer-executed method of claim 1 wherein computing an expected size of the backup data comprises: determining a base size as a data size from the most recent past backup job in the first history; determining a size delta as a weighted mean of differences between data sizes of consecutive past backup jobs in the first history; and summing the base size and the size delta to produce the expected size.
 4. The computer-executed method of claim 3 wherein: determining a size delta as a weighted mean comprises using a linear weighting vector whose component values sum to 1, whose smallest value is associated with the oldest past backup job in the first history, and whose largest value is associated with the most recent past backup job in the first history.
 5. The computer-executed method of claim 1 wherein computing an expected size of the backup data comprises: determining a base size as a mean of data sizes of past backup jobs in the first history; determining a size delta as the standard deviation of data sizes of past backup jobs in the first history; and summing the base size and the size delta to produce the expected size.
 6. The computer-executed method of claim 1 wherein computing an expected rate at which the backup data may be written comprises: determining a base rate as a completion rate from the most recent past backup job in the second history; determining a rate delta as a weighted mean of differences between completion rates of consecutive past backup jobs in the second history; and summing the base rate and the rate delta to produce the expected rate.
 7. The computer-executed method of claim 1 wherein computing an expected rate at which the backup data may be written comprises: determining a base rate as a mean of completion rates of past backup jobs in the second history; determining a rate delta as the standard deviation of completion rates of past backup jobs in the second history; and summing the base rate and the rate delta to produce the expected rate.
 8. The computer-executed method of claim 1, further comprising: in the context of computing at least the expected size or the expected rate, computing a measure of the degree to which samples differ from one another in the relevant one of the first and second histories; and responsive to the measure, choosing one of at least first and second methods for computing the expected size or the expected rate.
 9. The computer-executed method of claim 8 wherein computing the measure comprises: choosing three consecutive samples from the relevant one of the first and second histories; and computing the measure as the absolute value of twice one of the samples minus the sum of the other two samples.
 10. The computer-executed method of claim 8 wherein the first method comprises: determining a base value as a size or rate from the most recent past backup job in the first or second history, respectively; determining a delta as a weighted mean of differences between sizes or rates of consecutive past backup jobs in the first or second history, respectively; and summing the base value and the delta to produce the expected size or the expected rate.
 11. The computer-executed method of claim 10: wherein the first method is chosen when the measure is above a threshold value.
 12. The computer-executed method of claim 8 wherein the second method comprises: determining a base value as a mean of sizes or rates of past backup jobs in the first or second history, respectively; determining a delta as the standard deviation of sizes or rates of past backup jobs in the first or second history, respectively; and summing the base value and the delta to produce the expected size or the expected rate.
 13. The computer-executed method of claim 12: wherein the second method is chosen when the measure is below a threshold value.
 14. Apparatus for scheduling data backups, comprising: a repository of histories of completed backup jobs, each history containing sufficient information to identify a data source, a start time, a duration, a size and a target storage device for a completed backup job; a repository of specifications of currently-scheduled backup jobs, each of which either has not yet started or has not yet completed; an estimator component configured to determine, using the repository of histories of completed backup jobs, an expected completion time of at least one of the currently-scheduled backup jobs; and a scheduler component configured to select, responsive to the expected completion time, either a target storage device for a to-be-scheduled backup job or a start time for the to-be-scheduled backup job.
 15. The apparatus of claim 14, wherein: the estimator component is configured to determine the expected completion time by computing an expected size of the one currently-scheduled backup job and an expected rate at which data may be written to a target storage device specified by the one currently-scheduled backup job.
 16. The apparatus of claim 15, wherein: the estimator component is configured to compute at least the expected size or the expected rate by: determining either a first set of histories in the repository that specify a data source corresponding to the one currently-scheduled backup job, or a second set of histories in the repository that specify the target device corresponding to the one currently-scheduled backup job; determining a base value as either a size corresponding to a most recent backup job in the first set of histories, or a rate corresponding to the most recent backup job in the second set of histories; determining a delta as either a weighted mean of differences between sizes of consecutive backup jobs in the first set of histories, or a weighted mean of differences between rates of consecutive backup jobs in the second set of histories; and summing the base value and the delta to produce the expected size or the expected rate.
 17. The apparatus of claim 15, wherein: the estimator component is configured to compute either the expected size or the expected rate by: determining either a first set of histories in the repository that specify a data source corresponding to the one currently-scheduled backup job, or a second set of histories in the repository that specify the target device corresponding to the one currently-scheduled backup job; determining a base value as either the mean of the sizes of the backup jobs in the first set of histories, or the mean of rates of the backup jobs in the second set of histories; determining a delta as either the standard deviation of the sizes of the backup jobs in the first set of histories, or the standard deviation of the rates of the backup jobs in the second set of histories; and summing the base value and the delta to produce the expected size or the expected rate.
 18. At least one tangible computer-readable storage medium containing instructions that, when executed on at least one computing device, cause the at least one computing device to perform a method of scheduling a data backup, the method comprising: computing an expected size of a currently-scheduled backup job using a first set of histories of completed backup jobs that each specified the same data source as does the currently-scheduled backup job; computing an expected completion rate of the currently-scheduled backup job using a second set of histories of completed backup jobs that each specified the same target storage device as does the currently-scheduled backup job; computing an expected completion time for the currently-scheduled backup job using the expected size and the expected completion rate; and using the expected completion time, selecting either a target storage device for a to-be-scheduled backup job or a start time for the to-be-scheduled backup job.
 19. The at least one tangible computer-readable storage medium of claim 18 wherein: computing the expected size comprises summing a base size and a size delta; wherein the base size represents either a size from a most recent backup job in the first set or the mean of sizes of backup jobs in the first set; and wherein the size delta represents either the mean of size differences between consecutive backup jobs in the first set or the standard deviation of sizes of backup jobs in the first set.
 20. The at least one tangible computer-readable storage medium of claim 18 wherein: computing the expected rate comprises summing a base rate and a rate delta; wherein the base rate represents either a rate from a most recent backup job in the second set or the mean of rate of backup jobs in the second set; and wherein the rate delta represents either the mean of rate differences between consecutive backup jobs in the second set or the standard deviation of rate of backup jobs in the second set. 